package TestCTR;

import java.util.ArrayList;
import org.junit.Test;
import CTRLayer.*;
import ModelLayer.*;

public class TestActivityDetailsCTR
{
	private ActivityDetailsCTR  acd = new ActivityDetailsCTR();
	private ActivityDetails ac = new ActivityDetails();

	@Test
	public void testFindAllActivityDetails()
	{
		ArrayList<ActivityDetails> acdlist = acd.findAllActivityDetails();
		int id = 0;
		System.out.println("\nAntal Elementer : " + acdlist.size() + "\n");
		while (id < acdlist.size())
		{

			System.out.println("Goals             	 : " + acdlist.get(id).getGoal());
			System.out.println("Requirements      	 : " + acdlist.get(id).getRequirements());
			System.out.println("TrainingProcedure 	 : " + acdlist.get(id).getTrainingProcedure());
			System.out.println("PromptSuggestions 	 : " + acdlist.get(id).getPromptSuggestions());
			System.out.println("material         	 : " + acdlist.get(id).getMaterial());
			System.out.println("trainingMethod   	 : " + acdlist.get(id).getTrainingMethod());
			System.out.println("generalization   	 : " + acdlist.get(id).getGeneralization());
			TrainingActivity trainingActivity = acdlist.get(id).getTrainingActivity();
			System.out.println("TrainingActivityName	 : " + trainingActivity.getName());
			System.out.println("-------------------------------------------------------------------------");
			id++;
		}
	}

	@Test
	public void testFindActivityDetailsID()
	{
		int id = 1;
		ac = acd.findActivityDetailsID(id);
		System.out.println("FindActivityDetailsID : " + id);
		System.out.println("Goals                 : " + ac.getGoal());
		System.out.println("Requirements          : " + ac.getRequirements());
		System.out.println("TrainingProcedure     : " + ac.getTrainingProcedure());
		System.out.println("PromptSuggestions     : " + ac.getPromptSuggestions());
		System.out.println("material              : " + ac.getMaterial());
		System.out.println("trainingMethod        : " + ac.getTrainingMethod());
		System.out.println("generalization        : " + ac.getGeneralization());
		System.out.println("TrainingActivityName  : " + ac.getTrainingActivity().getName());
	}

}
